Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calamari:add the cache pool restful api for calamari #418

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

songbaisen
Copy link
Contributor

calamari:add the cache pool restful api for calamari

Signed-off-by: song baisen [email protected]

@songbaisen
Copy link
Contributor Author

The cache pool is very useful in ceph.So we need to add the rest api for user to use.

And right now only pull the code. If no body have doubt about this pr.later on i will add

unit test and update the doc.

pool_name = self._resolve_pool(pool_id)['pool_name']
cache_mode = self._resolve_pool(pool_id)['cache_mode']
commands = []
if cache_mode == "write_back":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@songbaisen This seems like we're ignoring a step where we should empty the write-back pool first. See http://docs.ceph.com/docs/master/dev/cache-pool/#interface under "Drain the cache in preparation for turning it off:" What do you think we could do to make this more correct?

Copy link
Contributor Author

@songbaisen songbaisen Apr 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GregMeno HI, thank you for your review and good advise.I think if the cache mode is write-back,Here we need to drain all the data from "cachepool" to "basepool" use the below command. After that we can remove the cache tier between the "cachepool" and "basepool".
ceph osd tier cache-mode "cachepool" forward
rados -p "cachepool" cache-flush-evict-all
To check the above operation finish .We can wait for the osdmap and check whether the "cachepool" already remove the tier relation by the "tier_of" is equal to -1.How do you think about this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GregMeno And here except writeback mode the read-forward and read-proxy also need to do the same operation drain the cache pool before turning it off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants